<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.ejoysoft.common.Constants,com.ejoysoft.util.ParamUtil,com.ejoysoft.wlanyz.business.Index,com.ejoysoft.common.*,com.ejoysoft.wlanyz.business.Ac,java.io.File,java.util.ArrayList,java.util.Vector,java.io.FileNotFoundException"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	try {
		Index obj = new Index(globa, false);

		String strUrl = "index_list.jsp";
		String strUrl1 = "index_add.jsp";
		if (action.equals(Constants.DELETE_STR)) {
			String[] aryStrId = ParamUtil.getStrArray(request, "strId");
			for (int i = 0; i < aryStrId.length; i++) {
				obj.delete("where strId ='" + aryStrId[i] + "'");
			}
			globa.dispatch(true, strUrl);
		} else if (action.equals(Constants.ADD_STR)) {
		    String strTaskType = ParamUtil.getString(request, "strTaskType", "");
			String strTestProject = ParamUtil.getString(request, "strTestProject", "");
			String strTestIndicator = ParamUtil.getString(request, "strTestIndicator", "");
			int strIndicatorValue = ParamUtil.getInt(request, "strIndicatorValue");
			int strLessorGreat = ParamUtil.getInt(request, "strLessorGreat");
			globa.dispatch(obj.add(strTaskType,strTestProject,strTestIndicator,strIndicatorValue,strLessorGreat), strUrl);
			
			
		}
		else if(action.equals(Constants.UPDATE_STR)){
            String  strId=ParamUtil.getString(request,"strId","");
            String strTaskType = ParamUtil.getString(request, "strTaskType", "");
			String strTestProject = ParamUtil.getString(request, "strTestProject", "");
			String strTestIndicator = ParamUtil.getString(request, "strTestIndicator", "");
			int strIndicatorValue = ParamUtil.getInt(request, "strIndicatorValue");
			int intLessorGreat = ParamUtil.getInt(request, "strLessorGreat");
                 globa.dispatch(obj.update(strId,strTaskType,strTestProject,strTestIndicator,strIndicatorValue,intLessorGreat),strUrl);
      }

		
		globa.closeCon();
	}

	catch (Exception e) {
		e.printStackTrace();
	}
%>